/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import controladora.ControlaPaciente;
import logs.Log;
import clinicanutricao.Paciente;
import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import state.EstadoEditar;
import state.EstadoNovo;
import state.EstadoVisualizar;
import state.StateMain;

/**
 *
 * @author Kdc
 */
public class TelaCadPaciente extends javax.swing.JFrame {

    /**
     * Creates new form telaCadPaciente
     */
    ControlaPaciente cp;
    Log log;
    StateMain estado;
    Paciente paciente;
    
    
    //Construtor para Estado Visualização e tb o edição
    public TelaCadPaciente(Paciente paciente, ControlaPaciente pacienteController, Log pLog) {
        
        initComponents();
        cp = pacienteController;
        cp.carregarPacientes();
        log = pLog;
        this.paciente = paciente;
        
        if(this.paciente == null)
        {
            estado = new EstadoNovo();
            estado.processar(this);
            
        }
        else
        {
          
            estado = new EstadoVisualizar();
            estado.processar(this);
            
        }
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jtNome = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtdataNascimento = new javax.swing.JFormattedTextField();
        jLabel3 = new javax.swing.JLabel();
        jcSexo = new javax.swing.JComboBox();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jbSalvar = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jbSair = new javax.swing.JButton();
        jlIMC = new javax.swing.JLabel();
        jlIAC = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jlClassificacaoIMC = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel12 = new javax.swing.JLabel();
        jlClassificacaoIAC = new javax.swing.JLabel();
        btnNovo = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jtAltura = new javax.swing.JTextField();
        jtPeso = new javax.swing.JTextField();
        jtQuadril = new javax.swing.JTextField();
        jtCintura = new javax.swing.JTextField();
        jlRCQ = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jlClassifcRCQ = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jlCC = new javax.swing.JLabel();
        jlClassifcCC = new javax.swing.JLabel();
        btnEditar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel1.setToolTipText("");
        jPanel1.setName(""); // NOI18N

        jLabel1.setText("Nome:");

        jtNome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtNomeActionPerformed(evt);
            }
        });

        jLabel2.setText("Nascimento:");

        try {
            jtdataNascimento.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel3.setText("Sexo:");

        jcSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Selecionar>", "M", "F" }));
        jcSexo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcSexoActionPerformed(evt);
            }
        });

        jLabel4.setText("Dados Calculados");

        jLabel5.setText("Altura (m):");

        jLabel6.setText("Peso (Kg):");

        jLabel7.setText("Medida do Quadril (cm):");

        jbSalvar.setText("Salvar");
        jbSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbSalvarActionPerformed(evt);
            }
        });

        jLabel8.setText("Valores:");

        jbSair.setText("Sair");
        jbSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbSairActionPerformed(evt);
            }
        });

        jLabel11.setText("Classificação:");

        jLabel12.setText("Dados do Paciente");

        btnNovo.setText("Novo");
        btnNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNovoActionPerformed(evt);
            }
        });

        jLabel14.setText("Medida da Cintura (cm):");

        jtAltura.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtAlturaActionPerformed(evt);
            }
        });

        jLabel9.setText("IMC:");

        jLabel16.setText("IAC:");

        jLabel17.setText("RCQ:");

        jLabel10.setText("ICC:");

        btnEditar.setText("Editar");
        btnEditar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator3)
                    .addComponent(jtNome)
                    .addComponent(jSeparator1)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnEditar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnNovo)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbSalvar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbSair))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jtdataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jtAltura)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addComponent(jtPeso, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtQuadril)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGap(104, 104, 104))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel12)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2))
                                .addGap(29, 29, 29)
                                .addComponent(jLabel3)
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel14)
                                    .addComponent(jtCintura, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel5))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel16)
                                    .addComponent(jLabel17))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jlIAC)
                                    .addComponent(jlRCQ)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel9)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jlIMC))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel10)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jlCC))
                                    .addComponent(jLabel8))
                                .addGap(71, 71, 71)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel11)
                                    .addComponent(jlClassifcCC)
                                    .addComponent(jlClassificacaoIAC)
                                    .addComponent(jlClassificacaoIMC)
                                    .addComponent(jlClassifcRCQ))))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtAltura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtPeso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtdataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtQuadril, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtCintura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jLabel11))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jlIMC, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel9)
                        .addComponent(jlClassificacaoIMC)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jlIAC)
                    .addComponent(jlClassificacaoIAC))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlRCQ)
                    .addComponent(jLabel17)
                    .addComponent(jlClassifcRCQ))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jlCC)
                    .addComponent(jlClassifcCC))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbSalvar)
                    .addComponent(jbSair)
                    .addComponent(btnNovo)
                    .addComponent(btnEditar))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jtNomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtNomeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtNomeActionPerformed

    private void jcSexoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcSexoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcSexoActionPerformed

    private void jtAlturaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtAlturaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtAlturaActionPerformed

    private void jbSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbSalvarActionPerformed

            
        if(jtNome.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Nome Vazio!");
        }
        else if(jtdataNascimento.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Data de Nascimento Vazio!");
        }
        else if(jcSexo.getSelectedIndex() == 0)
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Sexo Vazio!");
        }
        else if(jtAltura.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Altura Vazio!");
        }
        else if (jtPeso.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Peso Vazio!");
        }
        else if(jtQuadril.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(rootPane, "Campo Medida do Quadril Vazio!");
        }
        else
        {
            
            //se o paciente jah for cadastrado, primeiro o irei excluir 
            if(paciente != null)
            {
                if(cp.existePacienteCadastrado(paciente.getNome()))
                {
                    cp.ExcluirPaciente(paciente.getNome());
                }
                
            }
            
            cp.cadastarPaciente(jtNome.getText(), jtdataNascimento.getText(), jcSexo.getSelectedItem().toString().charAt(0), Double.parseDouble(jtAltura.getText()), Double.parseDouble(jtPeso.getText()), Double.parseDouble(jtQuadril.getText()),Double.parseDouble(jtCintura.getText()));
            log.escreve("Inserindo o Paciente " + jtNome.getText() + ", peso: " + jtPeso.getText() + ", altura: " + jtAltura.getText() + " no arquivo.");
            //Atualiza os Labels com as Classificações

            jlClassificacaoIMC.setText(cp.exibeClassificacaoDoMetodo(jtNome.getText(),"IMC"));
            jlClassificacaoIAC.setText(cp.exibeClassificacaoDoMetodo(jtNome.getText(),"IAC"));
            jlClassifcCC.setText(cp.exibeClassificacaoDoMetodo(jtNome.getText(),"CC"));
            jlClassifcRCQ.setText(cp.exibeClassificacaoDoMetodo(jtNome.getText(),"RCQ"));

            jlIMC.setText(cp.buscarValorMetodoCalculo(jtNome.getText(),"IMC"));
            jlIAC.setText(cp.buscarValorMetodoCalculo(jtNome.getText(),"IAC"));
            jlCC.setText(cp.buscarValorMetodoCalculo(jtNome.getText(),"CC"));
            jlRCQ.setText(cp.buscarValorMetodoCalculo(jtNome.getText(),"RCQ"));
            
            paciente = cp.buscarPaciente(jtNome.getText());
            
            //Acabei de salvar, entao entra pro estado de visualização
            estado =  new EstadoVisualizar();
            estado.processar(this);
            
        }
        
    }//GEN-LAST:event_jbSalvarActionPerformed

    private void jbSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbSairActionPerformed

        this.setVisible(false);
        this.dispose();

    }//GEN-LAST:event_jbSairActionPerformed

    private void btnNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNovoActionPerformed
         
        estado = new EstadoNovo();
        estado.processar(this);
        
    }//GEN-LAST:event_btnNovoActionPerformed

    private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditarActionPerformed
 
        estado = new EstadoEditar();
        estado.processar(this);
        
    }//GEN-LAST:event_btnEditarActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnEditar;
    private javax.swing.JButton btnNovo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JButton jbSair;
    private javax.swing.JButton jbSalvar;
    private javax.swing.JComboBox jcSexo;
    private javax.swing.JLabel jlCC;
    private javax.swing.JLabel jlClassifcCC;
    private javax.swing.JLabel jlClassifcRCQ;
    private javax.swing.JLabel jlClassificacaoIAC;
    private javax.swing.JLabel jlClassificacaoIMC;
    private javax.swing.JLabel jlIAC;
    private javax.swing.JLabel jlIMC;
    private javax.swing.JLabel jlRCQ;
    private javax.swing.JTextField jtAltura;
    private javax.swing.JTextField jtCintura;
    private javax.swing.JTextField jtNome;
    private javax.swing.JTextField jtPeso;
    private javax.swing.JTextField jtQuadril;
    private javax.swing.JFormattedTextField jtdataNascimento;
    // End of variables declaration//GEN-END:variables

    public ControlaPaciente getCp() {
        return cp;
    }

    public void setCp(ControlaPaciente cp) {
        this.cp = cp;
    }


    public Log getLog() {
        return log;
    }

    public void setLog(Log log) {
        this.log = log;
    }

    public StateMain getEstado() {
        return estado;
    }

    public void setEstado(StateMain estado) {
        this.estado = estado;
    }

    public JButton getBtnEditar() {
        return btnEditar;
    }

    public void setBtnEditar(JButton btnEditar) {
        this.btnEditar = btnEditar;
    }

    public JButton getBtnNovo() {
        return btnNovo;
    }

    public void setBtnNovo(JButton btnNovo) {
        this.btnNovo = btnNovo;
    }

    public JButton getJbSair() {
        return jbSair;
    }

    public void setJbSair(JButton jbSair) {
        this.jbSair = jbSair;
    }

    public JButton getJbSalvar() {
        return jbSalvar;
    }

    public void setJbSalvar(JButton jbSalvar) {
        this.jbSalvar = jbSalvar;
    }

    public JComboBox getJcSexo() {
        return jcSexo;
    }

    public void setJcSexo(JComboBox jcSexo) {
        this.jcSexo = jcSexo;
    }

    public JLabel getJlCC() {
        return jlCC;
    }

    public void setJlCC(JLabel jlCC) {
        this.jlCC = jlCC;
    }

    public JLabel getJlClassifcCC() {
        return jlClassifcCC;
    }

    public void setJlClassifcCC(JLabel jlClassifcCC) {
        this.jlClassifcCC = jlClassifcCC;
    }

    public JLabel getJlClassifcRCQ() {
        return jlClassifcRCQ;
    }

    public void setJlClassifcRCQ(JLabel jlClassifcRCQ) {
        this.jlClassifcRCQ = jlClassifcRCQ;
    }

    public JLabel getJlClassificacaoIAC() {
        return jlClassificacaoIAC;
    }

    public void setJlClassificacaoIAC(JLabel jlClassificacaoIAC) {
        this.jlClassificacaoIAC = jlClassificacaoIAC;
    }

    public JLabel getJlClassificacaoIMC() {
        return jlClassificacaoIMC;
    }

    public void setJlClassificacaoIMC(JLabel jlClassificacaoIMC) {
        this.jlClassificacaoIMC = jlClassificacaoIMC;
    }

    public JLabel getJlIAC() {
        return jlIAC;
    }

    public void setJlIAC(JLabel jlIAC) {
        this.jlIAC = jlIAC;
    }

    public JLabel getJlIMC() {
        return jlIMC;
    }

    public void setJlIMC(JLabel jlIMC) {
        this.jlIMC = jlIMC;
    }

    public JLabel getJlRCQ() {
        return jlRCQ;
    }

    public void setJlRCQ(JLabel jlRCQ) {
        this.jlRCQ = jlRCQ;
    }

    public JTextField getJtAltura() {
        return jtAltura;
    }

    public void setJtAltura(JTextField jtAltura) {
        this.jtAltura = jtAltura;
    }

    public JTextField getJtCintura() {
        return jtCintura;
    }

    public void setJtCintura(JTextField jtCintura) {
        this.jtCintura = jtCintura;
    }

    public JTextField getJtNome() {
        return jtNome;
    }

    public void setJtNome(JTextField jtNome) {
        this.jtNome = jtNome;
    }

    public JTextField getJtPeso() {
        return jtPeso;
    }

    public void setJtPeso(JTextField jtPeso) {
        this.jtPeso = jtPeso;
    }

    public JTextField getJtQuadril() {
        return jtQuadril;
    }

    public void setJtQuadril(JTextField jtQuadril) {
        this.jtQuadril = jtQuadril;
    }

    public JFormattedTextField getJtdataNascimento() {
        return jtdataNascimento;
    }

    public void setJtdataNascimento(JFormattedTextField jtdataNascimento) {
        this.jtdataNascimento = jtdataNascimento;
    }

    public Paciente getPacienteEdicao() {
        return paciente;
    }

    public void setPacienteEdicao(Paciente pacienteEdicao) {
        this.paciente = pacienteEdicao;
    }
   
}
